<html>
<head>
    <title>添加收费项目--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
</head>
<body>
<form action="charge.html" id="myForm" method="post" class="definewidth m20">
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">编号</td>
            <td>
                <input type="text" id="id" disabled=disabled>
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">收费项目名称</td>
            <td><input type="text" id="chargeName" disabled=disabled /></td>
        </tr>

        <tr>
            <td width="10%" class="tableleft">收费金额</td>
            <td><input type="text" id="chargeMoney" disabled=disabled /></td>
        </tr>

        <tr>
            <td width="10%" class="tableleft">修改时间</td>
            <td><input type="text" id="chargeDate" disabled=disabled /></td>
        </tr>

        <tr>
            <td width="10%" class="tableleft">创建时间</td>
            <td><input type="text" id="createDate" disabled=disabled /></td>
        </tr>

        <tr>
            <td colspan="2">
                <center>
                    <button type="button" class="btn btn-success" onclick="black()">返回列表</button>
                </center>
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript">
    function black(){
        window.location.href="charge.html";
    }

    //获取url
    (function($){
        $.getUrlParam
            = function(name)
        {
            var reg
                = new RegExp("(^|&)"+
                name +"=([^&]*)(&|$)");
            var r
                = window.location.search.substr(1).match(reg);
            if (r!=null) return unescape(r[2]); return null;
        }
    })(jQuery);
    var id = $.getUrlParam('id');

    //显示
    function show() {
        $.ajax({
            url:"/charge/getChargeById?id="+id,
            type:"GET",
            success:function(charge){
                $("#id").val(charge.id);
                $("#chargeName").val(charge.chargeName);
                $("#chargeMoney").val(charge.chargeMoney);
                $("#chargeDate").val(charge.chargeDate.toString());
                $("#createDate").val(charge.createDate.toString());
            }
        })
    }
    show();
</script>
</body>
</html>
<script>

</script>